<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //将字符串数组用|或其他符号分割
    let names=["卡卡西","佐助","鸣人","大蛇丸","雏田","小苏","凤姐","黑崎一护"];
    let AA="|"
    let BB=names[0]
    for (let i = 1; i < names.length; i++) {
            BB += AA + names[i];
    }
    console.log(BB)

</script>
</html>